package cn.bs.busuo.account.controller;


import cn.bs.busuo.account.pojo.entity.SightRoads;
import cn.bs.busuo.account.service.ISightRoadsService;
import cn.bs.busuo.common.web.JsonResult;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 0.0
 */
@RestController
@Api(tags = "5.路线图")
@RequestMapping("/roads/")
public class SightRoadsController {
    @Autowired
    private ISightRoadsService sightRoadsService;

    @ApiOperationSupport(order = 100)
    @ApiOperation("新增路线图")
    @PostMapping("/insert")
    public JsonResult insert(SightRoads sightRoads) {
        sightRoadsService.addRoads(sightRoads);
        return JsonResult.ok();
    }

    @ApiOperationSupport(order = 200)
    @ApiOperation("删除路线图")
    @PostMapping("/delete")
    public JsonResult delect(Long id) {
        sightRoadsService.deleteRoads(id);
        return JsonResult.ok();
    }
}
